﻿function getTime() {
    var now = new Date();
    hour = "" + now.getHours();
    minute = "" + now.getMinutes();
    second = "" + now.getSeconds();
    hour = (hour.length == 1 ? "0" + hour : hour);
    minute = (minute.length == 1 ? "0" + minute : minute);
    second = (second.length == 1 ? "0" + second : second);
    return time = hour + ":" + minute + ":" + second;
}